package cn.yishuai.ai.spring_mcp_server.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;

@Configuration
public class ChatClientConfig {

    @Bean
    public ChatClient chatClient(ChatModel chatModel) {
        // Spring 会自动注入你当前配置的模型（这里是 Ollama）
        return ChatClient.create(chatModel);
    }
}